{% extends "base_2col.html" %}
{% load i18n %}
{% block otherjs %}
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.livequery.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/china_cities.js"></script>
<script type="text/javascript">
    $(function(){
        $("#id_birthday").parent().append('{% trans "format should be 2008-08-08" %}');
        $("#id_slogan").parent().append('<span><span id="snum"></span> {% trans "members have chosen this slogan." %}</span>');
        $("#snum").parent().hide();
        $("#id_principle").parent().append('<span><span id="pnum"></span> {% trans "members have chosen this principle." %}</span>');
        $("#pnum").parent().hide();
        $("#id_slogan").change(function(){
        var id=$(this).get(0).selectedIndex;
        id = parseInt(id)-1;
        $.ajax({
            type:"get",
            url: "/users/snum/"+id + "/", 
            success:function(data){
                $("#snum").parent().show();
                $("#snum").html(data);
            }
        });
    });
    $("#id_principle").change(function(){
        var id=$(this).get(0).selectedIndex;
        id = parseInt(id)-1;
        $.ajax({
            type:"get",
            url: "/users/pnum/"+id + "/", 
            success:function(data){
                $("#pnum").parent().show();
                $("#pnum").html(data);
            }
        });

    });

    });
</script>
{% endblock %}
{% block content %}
<h1>{% trans "update your account info" %}</h1>

{% if form.is_multipart %}
<form enctype="multipart/form-data" action="" method="post">
{% else %}
<form  action="" method="post">
{% endif %}
    {% for field in form %}
    <div class="fieldWrapper">
        {{ field.errors }}
        {{ field.help_text }}: {{ field }}
    </div>
    {% endfor %}
    <input type="submit" value='{% trans "submit" %}' />
</form>


{% endblock %}
